package cn.zjh.system.service.impl;

import cn.zjh.user.service.service.impl.BaseServiceImpl;
import cn.zjh.system.domain.SystemDetail;
import cn.zjh.system.mapper.SystemDetailMapper;
import cn.zjh.system.query.SystemDetailQuery;
import cn.zjh.system.service.ISystemDetailService;
import cn.zjh.base.utils.PageList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS)
public class SystemDetailServiceImpl extends BaseServiceImpl<SystemDetail> implements ISystemDetailService {

    @Autowired
    private SystemDetailMapper systemDetailMapper;



    @Override
    public PageList<SystemDetail> getData(Long id, SystemDetailQuery systemDetailQuery) {

        List<SystemDetail> rows = systemDetailMapper.getData(id,systemDetailQuery);


        Integer total = systemDetailMapper.drawerQueryCount(id);


        return new PageList<>(total,rows);
    }
}
